package com.hdjd.dao;

import com.hdjd.entities.ReceiveAddress;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ReceiveAddressDao {

    /**
     * 根据账户Id查询账户的默认收获地址
     * @param accId
     * @return
     */
    Integer getDefaultReAddressIdByAccId(@Param("accId") Integer accId);

    /**
     * 根据账户Id查询账户的所有收获地址
     * @param accId
     * @return
     */
    List<ReceiveAddress> selectReceiveAddressByAccId(@Param("accId") Integer accId);

    /**
     * 根据账户Id查询账户的默认收获地址
     * @param accId
     * @return
     */
    ReceiveAddress getDefaultReceiveAddressByAccId(@Param("accId") Integer accId);

    int deleteByPrimaryKey(Integer reAddressId);

    int insert(ReceiveAddress record);

    int insertSelective(ReceiveAddress record);

    ReceiveAddress selectByPrimaryKey(Integer reAddressId);

    int updateByPrimaryKeySelective(ReceiveAddress record);

    int updateByPrimaryKey(ReceiveAddress record);
}